<template>
  <i :class="isFullScreen?'icon-tuichuquanping':'icon-quanping'"
     @click="handleScreen"></i>
</template>
<script>
import {fullscreenToggle, listenfullscreen} from "utils/util";
import {mapState} from "pinia";
import useCommonStore from "@/stores/useCommonStore";


export default {
  computed: {
    ...mapState(useCommonStore, ["isFullScreen"])
  },
  mounted() {
    listenfullscreen(this.setScreen);
  },
  methods: {
    setScreen() {
      let commonStore = useCommonStore()
      console.log("commonStore", commonStore)
      commonStore.SET_FULLSCREN();
    },
    handleScreen() {
      fullscreenToggle();
    },
  }
}
</script>
